package org.lightcommons.util;

class TargetThread extends Thread {
	private ThreadPool pool;
	
	protected TargetThread(ThreadPool pool) {
		super();
		this.pool = pool;
	}

	public void run() {
		while(true){
			try{
				pool.edqueue().run();
			}catch(Throwable t){
				t.printStackTrace();
			}
			try {
				Thread.sleep(50);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
